import Vue from 'vue'
import Vuex from 'vuex'

Vue.use(Vuex)

export default new Vuex.Store({
  state: {
    // 当前路由
    routes: sessionStorage.getItem('fdc-routes')
  },
  getters: {
  },
  mutations: {
    // 保存路由
    setRoutes(state, routes) {
      state.routes = routes
      sessionStorage.setItem('fdc-routes', routes)
    }
  },
  actions: {
  },
  modules: {
  }
})
